import React, {Component} from 'react';
import {Redirect, Link, Switch, Route, HashRouter as Router} from 'react-router-dom'
import { Tabs } from 'antd';

import TopicSetting from "./topicSetting"
import Analysis from "./analysis"
import InfoList from "./infoList"
import "./../../static/specialMonitoring/topicDetail.styl"
const TabPane = Tabs.TabPane;

export default class TopicDetail extends React.Component {
  state={
    index:this.props.location.search.split('&')[0].replace(/[^0-9]/ig,""),
    key:this.props.location.search.split('&')[1].replace(/[^0-9]/ig,""),
  };
  render() {
    return (
      <div className="td-cistern">
        <Tabs defaultActiveKey={this.state.key} tabPosition='left' style={{width:"100%",height:"100%"}}>
          <TabPane tab="信息列表" key="1">
            <InfoList index={this.state.index}/>
          </TabPane>
          <TabPane tab="专题分析" key="2">
            <Analysis index={this.state.index}/>
          </TabPane>
          <TabPane tab="专题设置" key="3">
            <TopicSetting index={this.state.index}/>
          </TabPane>
        </Tabs>
      </div>
    );
  }
}